/* UTF8 Encoding */
/*-----------------------------------------------------------------------
|                            FILE DESCRIPTION                           |
-----------------------------------------------------------------------*/
/*----------------------------------------------------------------------
  - File name     : cutil.h
  - Author        : liuzhihua (liuzhihuawy@163.com)
  - Update date   : 2024.05.03
  - Brief         : c tool
  - Version       : v0.1
-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------
|                               UPDATE NOTE                             |
-----------------------------------------------------------------------*/
/**
  * Update note:
  * ------------   ---------------   ----------------------------------
  *     Date            Author                      Note
  * ------------   ---------------   ----------------------------------
  *  2024.05.03       liuzhihua                  Create file          
***/

#ifndef CUTIL_H_
#define CUTIL_H_

/*-----------------------------------------------------------------------
|                               INCLUDES                                |
-----------------------------------------------------------------------*/
#include <stdint.h>

#ifdef  __cplusplus
    extern "C" {
#endif
/*-----------------------------------------------------------------------
|                                DEFINES                                |
-----------------------------------------------------------------------*/
typedef struct carray_type_def
{
    uint8_t *pdata;
    uint32_t size;
}carray_t;

/*-----------------------------------------------------------------------
|                                  API                                  |
-----------------------------------------------------------------------*/
uint8_t *data_find_char(const uint8_t *pdata, uint16_t size, char c);
uint8_t *data_find_sub(const uint8_t *pdata, uint8_t size, const uint8_t *subdata, uint8_t subdatasize);

#ifdef __cplusplus
	}
#endif
#endif
